home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / ImageCodec.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  20.3 KB  |  596 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ImageCodec.a
  3. ;
  4. ;    Contains:    QuickTime Interfaces.
  5. ;
  6. ;    Version:    Technology:    QuickTime 2.5
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1990-1997 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__IMAGECODEC__') = 'UNDEFINED' THEN
  19. __IMAGECODEC__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  25.     include 'Quickdraw.a'
  26.     ENDIF
  27.     IF &TYPE('__IMAGECOMPRESSION__') = 'UNDEFINED' THEN
  28.     include 'ImageCompression.a'
  29.     ENDIF
  30.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  31.     include 'Components.a'
  32.     ENDIF
  33.  
  34. ;     codec capabilities flags    
  35.  
  36. codecCanScale                    EQU        $00000001
  37. codecCanMask                    EQU        $00000002
  38. codecCanMatte                    EQU        $00000004
  39. codecCanTransform                EQU        $00000008
  40. codecCanTransferMode            EQU        $00000010
  41. codecCanCopyPrev                EQU        $00000020
  42. codecCanSpool                    EQU        $00000040
  43. codecCanClipVertical            EQU        $00000080
  44. codecCanClipRectangular            EQU        $00000100
  45. codecCanRemapColor                EQU        $00000200
  46. codecCanFastDither                EQU        $00000400
  47. codecCanSrcExtract                EQU        $00000800
  48. codecCanCopyPrevComp            EQU        $00001000
  49. codecCanAsync                    EQU        $00002000
  50. codecCanMakeMask                EQU        $00004000
  51. codecCanShift                    EQU        $00008000
  52. codecCanAsyncWhen                EQU        $00010000
  53. codecCanShieldCursor            EQU        $00020000
  54. codecCanManagePrevBuffer        EQU        $00040000
  55. codecHasVolatileBuffer            EQU        $00080000
  56. codecWantsRegionMask            EQU        $00100000
  57. codecImageBufferIsOnScreen        EQU        $00200000
  58. codecWantsDestinationPixels        EQU        $00400000
  59.  
  60. CodecCapabilities        RECORD 0
  61. flags                     ds.l    1                ; offset: $0 (0)
  62. wantedPixelSize             ds.w    1                ; offset: $4 (4)
  63. extendWidth                 ds.w    1                ; offset: $6 (6)
  64. extendHeight             ds.w    1                ; offset: $8 (8)
  65. bandMin                     ds.w    1                ; offset: $A (10)
  66. bandInc                     ds.w    1                ; offset: $C (12)
  67. pad                         ds.w    1                ; offset: $E (14)
  68. time                     ds.l    1                ; offset: $10 (16)
  69. sizeof                     EQU *                    ; size:   $14 (20)
  70.                         ENDR
  71. ;     codec condition flags    
  72.  
  73. codecConditionFirstBand            EQU        $00000001
  74. codecConditionLastBand            EQU        $00000002
  75. codecConditionFirstFrame        EQU        $00000004
  76. codecConditionNewDepth            EQU        $00000008
  77. codecConditionNewTransform        EQU        $00000010
  78. codecConditionNewSrcRect        EQU        $00000020
  79. codecConditionNewMask            EQU        $00000040
  80. codecConditionNewMatte            EQU        $00000080
  81. codecConditionNewTransferMode    EQU        $00000100
  82. codecConditionNewClut            EQU        $00000200
  83. codecConditionNewAccuracy        EQU        $00000400
  84. codecConditionNewDestination    EQU        $00000800
  85. codecConditionFirstScreen        EQU        $00001000
  86. codecConditionDoCursor            EQU        $00002000
  87. codecConditionCatchUpDiff        EQU        $00004000
  88. codecConditionMaskMayBeChanged    EQU        $00008000
  89. codecConditionToBuffer            EQU        $00010000
  90. codecConditionCodecChangedMask    EQU        $80000000
  91.  
  92.  
  93. codecInfoResourceType            EQU        'cdci'                ; codec info resource type 
  94. codecInterfaceVersion            EQU        2                    ; high word returned in component GetVersion 
  95. CDSequenceDataSource    RECORD 0
  96. recordSize                 ds.l    1                ; offset: $0 (0)
  97. next                     ds.l    1                ; offset: $4 (4)
  98. seqID                     ds.l    1                ; offset: $8 (8)
  99. sourceID                 ds.l    1                ; offset: $C (12)
  100. sourceType                 ds.l    1                ; offset: $10 (16)
  101. sourceInputNumber         ds.l    1                ; offset: $14 (20)
  102. dataPtr                     ds.l    1                ; offset: $18 (24)
  103. dataDescription             ds.l    1                ; offset: $1C (28)
  104. changeSeed                 ds.l    1                ; offset: $20 (32)
  105. transferProc             ds.l    1                ; offset: $24 (36)
  106. transferRefcon             ds.l    1                ; offset: $28 (40)
  107. ;  The following fields only exist for QuickTime 2.5 and greater 
  108. dataSize                 ds.l    1                ; offset: $2C (44)
  109. sizeof                     EQU *                    ; size:   $30 (48)
  110.                         ENDR
  111. ; typedef struct CDSequenceDataSource *    CDSequenceDataSourcePtr
  112.  
  113. CodecCompressParams        RECORD 0
  114. sequenceID                 ds.l    1                ; offset: $0 (0)        ;  precompress,bandcompress 
  115. imageDescription         ds.l    1                ; offset: $4 (4)        ;  precompress,bandcompress 
  116. data                     ds.l    1                ; offset: $8 (8)
  117. bufferSize                 ds.l    1                ; offset: $C (12)
  118. frameNumber                 ds.l    1                ; offset: $10 (16)
  119. startLine                 ds.l    1                ; offset: $14 (20)
  120. stopLine                 ds.l    1                ; offset: $18 (24)
  121. conditionFlags             ds.l    1                ; offset: $1C (28)
  122. callerFlags                 ds.w    1                ; offset: $20 (32)
  123. capabilities             ds.l    1                ; offset: $22 (34)        ;  precompress,bandcompress 
  124. progressProcRecord         ds        ICMProgressProcRecord ; offset: $26 (38)
  125. completionProcRecord     ds        ICMCompletionProcRecord ; offset: $2E (46)
  126. flushProcRecord             ds        ICMFlushProcRecord ; offset: $36 (54)
  127. srcPixMap                 ds        PixMap            ; offset: $3E (62)        ;  precompress,bandcompress 
  128. prevPixMap                 ds        PixMap            ; offset: $70 (112)
  129. spatialQuality             ds.l    1                ; offset: $A2 (162)
  130. temporalQuality             ds.l    1                ; offset: $A6 (166)
  131. similarity                 ds.l    1                ; offset: $AA (170)
  132. dataRateParams             ds.l    1                ; offset: $AE (174)
  133. reserved                 ds.l    1                ; offset: $B2 (178)
  134. ;  The following fields only exist for QuickTime 2.1 and greater 
  135. majorSourceChangeSeed     ds.w    1                ; offset: $B6 (182)
  136. minorSourceChangeSeed     ds.w    1                ; offset: $B8 (184)
  137. sourceData                 ds.l    1                ; offset: $BA (186)
  138. ;  The following fields only exit for QuickTime 2.5 and greater 
  139. preferredPacketSizeInBytes  ds.l 1                ; offset: $BE (190)
  140. sizeof                     EQU *                    ; size:   $C2 (194)
  141.                         ENDR
  142. CodecDecompressParams    RECORD 0
  143. sequenceID                 ds.l    1                ; offset: $0 (0)        ;  predecompress,banddecompress 
  144. imageDescription         ds.l    1                ; offset: $4 (4)        ;  predecompress,banddecompress 
  145. data                     ds.l    1                ; offset: $8 (8)
  146. bufferSize                 ds.l    1                ; offset: $C (12)
  147. frameNumber                 ds.l    1                ; offset: $10 (16)
  148. startLine                 ds.l    1                ; offset: $14 (20)
  149. stopLine                 ds.l    1                ; offset: $18 (24)
  150. conditionFlags             ds.l    1                ; offset: $1C (28)
  151. callerFlags                 ds.w    1                ; offset: $20 (32)
  152. capabilities             ds.l    1                ; offset: $22 (34)        ;  predecompress,banddecompress 
  153. progressProcRecord         ds        ICMProgressProcRecord ; offset: $26 (38)
  154. completionProcRecord     ds        ICMCompletionProcRecord ; offset: $2E (46)
  155. dataProcRecord             ds        ICMDataProcRecord ; offset: $36 (54)
  156. port                     ds.l    1                ; offset: $3E (62)        ;  predecompress,banddecompress 
  157. dstPixMap                 ds        PixMap            ; offset: $42 (66)        ;  predecompress,banddecompress 
  158. maskBits                 ds.l    1                ; offset: $74 (116)
  159. mattePixMap                 ds.l    1                ; offset: $78 (120)
  160. srcRect                     ds        Rect            ; offset: $7C (124)        ;  predecompress,banddecompress 
  161. matrix                     ds.l    1                ; offset: $84 (132)        ;  predecompress,banddecompress 
  162. accuracy                 ds.l    1                ; offset: $88 (136)        ;  predecompress,banddecompress 
  163. transferMode             ds.w    1                ; offset: $8C (140)        ;  predecompress,banddecompress 
  164. frameTime                 ds.l    1                ; offset: $8E (142)        ;  banddecompress 
  165. reserved                 ds.l    1                ; offset: $92 (146) <-- really an array of length one
  166. ;  The following fields only exist for QuickTime 2.0 and greater 
  167. matrixFlags                 ds.b    1                ; offset: $96 (150)        ;  high bit set if 2x resize 
  168. matrixType                 ds.b    1                ; offset: $97 (151)
  169. dstRect                     ds        Rect            ; offset: $98 (152)        ;  only valid for simple transforms 
  170. ;  The following fields only exist for QuickTime 2.1 and greater 
  171. majorSourceChangeSeed     ds.w    1                ; offset: $A0 (160)
  172. minorSourceChangeSeed     ds.w    1                ; offset: $A2 (162)
  173. sourceData                 ds.l    1                ; offset: $A4 (164)
  174. maskRegion                 ds.l    1                ; offset: $A8 (168)
  175. ;  The following fields only exist for QuickTime 2.5 and greater 
  176. wantedDestinationPixelTypes  ds.l 1                ; offset: $AC (172)        ;  Handle to 0-terminated list of OSTypes 
  177. screenFloodMethod         ds.l    1                ; offset: $B0 (176)
  178. screenFloodValue         ds.l    1                ; offset: $B4 (180)
  179. preferredOffscreenPixelSize  ds.w 1                ; offset: $B8 (184)
  180. sizeof                     EQU *                    ; size:   $BA (186)
  181.                         ENDR
  182.  
  183. matrixFlagScale2x                EQU        $00000080
  184. matrixFlagScale1x                EQU        $00000040
  185. matrixFlagScaleHalf                EQU        $00000020
  186.  
  187. kScreenFloodMethodNone            EQU        0
  188. kScreenFloodMethodKeyColor        EQU        1
  189. kScreenFloodMethodAlpha            EQU        2
  190. ;     codec selectors 0-127 are reserved by Apple 
  191. ;     codec selectors 128-191 are subtype specific 
  192. ;     codec selectors 192-255 are vendor specific 
  193. ;     codec selectors 256-32767 are available for general use 
  194. ;     negative selectors are reserved by the Component Manager 
  195. ;
  196. ; pascal ComponentResult ImageCodecGetCodecInfo(ComponentInstance ci, CodecInfo *info)
  197. ;
  198.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  199.         Macro
  200.         _ImageCodecGetCodecInfo
  201.             move.l              #$00040000,-(sp)
  202.             moveq               #0,D0
  203.             dc.w                $A82A
  204.         EndM
  205.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  206.         IMPORT_CFM_FUNCTION ImageCodecGetCodecInfo
  207.     ENDIF
  208.  
  209. ;
  210. ; pascal ComponentResult ImageCodecGetCompressionTime(ComponentInstance ci, PixMapHandle src, const Rect *srcRect, short depth, CodecQ *spatialQuality, CodecQ *temporalQuality, unsigned long *time)
  211. ;
  212.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  213.         Macro
  214.         _ImageCodecGetCompressionTime
  215.             move.l              #$00160001,-(sp)
  216.             moveq               #0,D0
  217.             dc.w                $A82A
  218.         EndM
  219.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  220.         IMPORT_CFM_FUNCTION ImageCodecGetCompressionTime
  221.     ENDIF
  222.  
  223. ;
  224. ; pascal ComponentResult ImageCodecGetMaxCompressionSize(ComponentInstance ci, PixMapHandle src, const Rect *srcRect, short depth, CodecQ quality, long *size)
  225. ;
  226.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  227.         Macro
  228.         _ImageCodecGetMaxCompressionSize
  229.             move.l              #$00120002,-(sp)
  230.             moveq               #0,D0
  231.             dc.w                $A82A
  232.         EndM
  233.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  234.         IMPORT_CFM_FUNCTION ImageCodecGetMaxCompressionSize
  235.     ENDIF
  236.  
  237. ;
  238. ; pascal ComponentResult ImageCodecPreCompress(ComponentInstance ci, CodecCompressParams *params)
  239. ;
  240.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  241.         Macro
  242.         _ImageCodecPreCompress
  243.             move.l              #$00040003,-(sp)
  244.             moveq               #0,D0
  245.             dc.w                $A82A
  246.         EndM
  247.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  248.         IMPORT_CFM_FUNCTION ImageCodecPreCompress
  249.     ENDIF
  250.  
  251. ;
  252. ; pascal ComponentResult ImageCodecBandCompress(ComponentInstance ci, CodecCompressParams *params)
  253. ;
  254.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  255.         Macro
  256.         _ImageCodecBandCompress
  257.             move.l              #$00040004,-(sp)
  258.             moveq               #0,D0
  259.             dc.w                $A82A
  260.         EndM
  261.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  262.         IMPORT_CFM_FUNCTION ImageCodecBandCompress
  263.     ENDIF
  264.  
  265. ;
  266. ; pascal ComponentResult ImageCodecPreDecompress(ComponentInstance ci, CodecDecompressParams *params)
  267. ;
  268.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  269.         Macro
  270.         _ImageCodecPreDecompress
  271.             move.l              #$00040005,-(sp)
  272.             moveq               #0,D0
  273.             dc.w                $A82A
  274.         EndM
  275.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  276.         IMPORT_CFM_FUNCTION ImageCodecPreDecompress
  277.     ENDIF
  278.  
  279. ;
  280. ; pascal ComponentResult ImageCodecBandDecompress(ComponentInstance ci, CodecDecompressParams *params)
  281. ;
  282.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  283.         Macro
  284.         _ImageCodecBandDecompress
  285.             move.l              #$00040006,-(sp)
  286.             moveq               #0,D0
  287.             dc.w                $A82A
  288.         EndM
  289.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  290.         IMPORT_CFM_FUNCTION ImageCodecBandDecompress
  291.     ENDIF
  292.  
  293. ;
  294. ; pascal ComponentResult ImageCodecBusy(ComponentInstance ci, ImageSequence seq)
  295. ;
  296.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  297.         Macro
  298.         _ImageCodecBusy
  299.             move.l              #$00040007,-(sp)
  300.             moveq               #0,D0
  301.             dc.w                $A82A
  302.         EndM
  303.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  304.         IMPORT_CFM_FUNCTION ImageCodecBusy
  305.     ENDIF
  306.  
  307. ;
  308. ; pascal ComponentResult ImageCodecGetCompressedImageSize(ComponentInstance ci, ImageDescriptionHandle desc, Ptr data, long bufferSize, ICMDataProcRecordPtr dataProc, long *dataSize)
  309. ;
  310.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  311.         Macro
  312.         _ImageCodecGetCompressedImageSize
  313.             move.l              #$00140008,-(sp)
  314.             moveq               #0,D0
  315.             dc.w                $A82A
  316.         EndM
  317.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  318.         IMPORT_CFM_FUNCTION ImageCodecGetCompressedImageSize
  319.     ENDIF
  320.  
  321. ;
  322. ; pascal ComponentResult ImageCodecGetSimilarity(ComponentInstance ci, PixMapHandle src, const Rect *srcRect, ImageDescriptionHandle desc, Ptr data, Fixed *similarity)
  323. ;
  324.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  325.         Macro
  326.         _ImageCodecGetSimilarity
  327.             move.l              #$00140009,-(sp)
  328.             moveq               #0,D0
  329.             dc.w                $A82A
  330.         EndM
  331.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  332.         IMPORT_CFM_FUNCTION ImageCodecGetSimilarity
  333.     ENDIF
  334.  
  335. ;
  336. ; pascal ComponentResult ImageCodecTrimImage(ComponentInstance ci, ImageDescriptionHandle Desc, Ptr inData, long inBufferSize, ICMDataProcRecordPtr dataProc, Ptr outData, long outBufferSize, ICMFlushProcRecordPtr flushProc, Rect *trimRect, ICMProgressProcRecordPtr progressProc)
  337. ;
  338.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  339.         Macro
  340.         _ImageCodecTrimImage
  341.             move.l              #$0024000A,-(sp)
  342.             moveq               #0,D0
  343.             dc.w                $A82A
  344.         EndM
  345.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  346.         IMPORT_CFM_FUNCTION ImageCodecTrimImage
  347.     ENDIF
  348.  
  349. ;
  350. ; pascal ComponentResult ImageCodecRequestSettings(ComponentInstance ci, Handle settings, Rect *rp, ModalFilterUPP filterProc)
  351. ;
  352.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  353.         Macro
  354.         _ImageCodecRequestSettings
  355.             move.l              #$000C000B,-(sp)
  356.             moveq               #0,D0
  357.             dc.w                $A82A
  358.         EndM
  359.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  360.         IMPORT_CFM_FUNCTION ImageCodecRequestSettings
  361.     ENDIF
  362.  
  363. ;
  364. ; pascal ComponentResult ImageCodecGetSettings(ComponentInstance ci, Handle settings)
  365. ;
  366.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  367.         Macro
  368.         _ImageCodecGetSettings
  369.             move.l              #$0004000C,-(sp)
  370.             moveq               #0,D0
  371.             dc.w                $A82A
  372.         EndM
  373.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  374.         IMPORT_CFM_FUNCTION ImageCodecGetSettings
  375.     ENDIF
  376.  
  377. ;
  378. ; pascal ComponentResult ImageCodecSetSettings(ComponentInstance ci, Handle settings)
  379. ;
  380.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  381.         Macro
  382.         _ImageCodecSetSettings
  383.             move.l              #$0004000D,-(sp)
  384.             moveq               #0,D0
  385.             dc.w                $A82A
  386.         EndM
  387.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  388.         IMPORT_CFM_FUNCTION ImageCodecSetSettings
  389.     ENDIF
  390.  
  391. ;
  392. ; pascal ComponentResult ImageCodecFlush(ComponentInstance ci)
  393. ;
  394.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  395.         Macro
  396.         _ImageCodecFlush
  397.             move.l              #$0000000E,-(sp)
  398.             moveq               #0,D0
  399.             dc.w                $A82A
  400.         EndM
  401.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  402.         IMPORT_CFM_FUNCTION ImageCodecFlush
  403.     ENDIF
  404.  
  405. ;
  406. ; pascal ComponentResult ImageCodecSetTimeCode(ComponentInstance ci, void *timeCodeFormat, void *timeCodeTime)
  407. ;
  408.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  409.         Macro
  410.         _ImageCodecSetTimeCode
  411.             move.l              #$0008000F,-(sp)
  412.             moveq               #0,D0
  413.             dc.w                $A82A
  414.         EndM
  415.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  416.         IMPORT_CFM_FUNCTION ImageCodecSetTimeCode
  417.     ENDIF
  418.  
  419. ;
  420. ; pascal ComponentResult ImageCodecIsImageDescriptionEquivalent(ComponentInstance ci, ImageDescriptionHandle newDesc, Boolean *equivalent)
  421. ;
  422.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  423.         Macro
  424.         _ImageCodecIsImageDescriptionEquivalent
  425.             move.l              #$00080010,-(sp)
  426.             moveq               #0,D0
  427.             dc.w                $A82A
  428.         EndM
  429.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  430.         IMPORT_CFM_FUNCTION ImageCodecIsImageDescriptionEquivalent
  431.     ENDIF
  432.  
  433. ;
  434. ; pascal ComponentResult ImageCodecNewMemory(ComponentInstance ci, Ptr *data, Size dataSize, long dataUse, ICMMemoryDisposedUPP memoryGoneProc, void *refCon)
  435. ;
  436.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  437.         Macro
  438.         _ImageCodecNewMemory
  439.             move.l              #$00140011,-(sp)
  440.             moveq               #0,D0
  441.             dc.w                $A82A
  442.         EndM
  443.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  444.         IMPORT_CFM_FUNCTION ImageCodecNewMemory
  445.     ENDIF
  446.  
  447. ;
  448. ; pascal ComponentResult ImageCodecDisposeMemory(ComponentInstance ci, Ptr data)
  449. ;
  450.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  451.         Macro
  452.         _ImageCodecDisposeMemory
  453.             move.l              #$00040012,-(sp)
  454.             moveq               #0,D0
  455.             dc.w                $A82A
  456.         EndM
  457.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  458.         IMPORT_CFM_FUNCTION ImageCodecDisposeMemory
  459.     ENDIF
  460.  
  461. ;
  462. ; pascal ComponentResult ImageCodecHitTestData(ComponentInstance ci, ImageDescriptionHandle desc, void *data, Size dataSize, Point where, Boolean *hit)
  463. ;
  464.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  465.         Macro
  466.         _ImageCodecHitTestData
  467.             move.l              #$00140013,-(sp)
  468.             moveq               #0,D0
  469.             dc.w                $A82A
  470.         EndM
  471.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  472.         IMPORT_CFM_FUNCTION ImageCodecHitTestData
  473.     ENDIF
  474.  
  475. ;
  476. ; pascal ComponentResult ImageCodecNewImageBufferMemory(ComponentInstance ci, CodecDecompressParams *params, long flags, ICMMemoryDisposedUPP memoryGoneProc, void *refCon)
  477. ;
  478.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  479.         Macro
  480.         _ImageCodecNewImageBufferMemory
  481.             move.l              #$00100014,-(sp)
  482.             moveq               #0,D0
  483.             dc.w                $A82A
  484.         EndM
  485.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  486.         IMPORT_CFM_FUNCTION ImageCodecNewImageBufferMemory
  487.     ENDIF
  488.  
  489. ;
  490. ; pascal ComponentResult ImageCodecExtractAndCombineFields(ComponentInstance ci, long fieldFlags, void *data1, long dataSize1, ImageDescriptionHandle desc1, void *data2, long dataSize2, ImageDescriptionHandle desc2, void *outputData, long *outDataSize, ImageDescriptionHandle descOut)
  491. ;
  492.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  493.         Macro
  494.         _ImageCodecExtractAndCombineFields
  495.             move.l              #$00280015,-(sp)
  496.             moveq               #0,D0
  497.             dc.w                $A82A
  498.         EndM
  499.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  500.         IMPORT_CFM_FUNCTION ImageCodecExtractAndCombineFields
  501.     ENDIF
  502.  
  503. ;
  504. ; pascal ComponentResult ImageCodecGetMaxCompressionSizeWithSources(ComponentInstance ci, PixMapHandle src, const Rect *srcRect, short depth, CodecQ quality, CDSequenceDataSourcePtr sourceData, long *size)
  505. ;
  506.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  507.         Macro
  508.         _ImageCodecGetMaxCompressionSizeWithSources
  509.             move.l              #$00160016,-(sp)
  510.             moveq               #0,D0
  511.             dc.w                $A82A
  512.         EndM
  513.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  514.         IMPORT_CFM_FUNCTION ImageCodecGetMaxCompressionSizeWithSources
  515.     ENDIF
  516.  
  517.  
  518.  
  519.  
  520. kMotionJPEGTag                    EQU        'mjpg'
  521. MotionJPEGApp1Marker    RECORD 0
  522. unused                     ds.l    1                ; offset: $0 (0)
  523. tag                         ds.l    1                ; offset: $4 (4)
  524. fieldSize                 ds.l    1                ; offset: $8 (8)
  525. paddedFieldSize             ds.l    1                ; offset: $C (12)
  526. offsetToNextField         ds.l    1                ; offset: $10 (16)
  527. qTableOffset             ds.l    1                ; offset: $14 (20)
  528. huffmanTableOffset         ds.l    1                ; offset: $18 (24)
  529. sofOffset                 ds.l    1                ; offset: $1C (28)
  530. sosOffset                 ds.l    1                ; offset: $20 (32)
  531. soiOffset                 ds.l    1                ; offset: $24 (36)
  532. sizeof                     EQU *                    ; size:   $28 (40)
  533.                         ENDR
  534.  
  535. ;
  536. ; pascal ComponentResult QTPhotoSetSampling(ComponentInstance codec, short yH, short yV, short cbH, short cbV, short crH, short crV)
  537. ;
  538.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  539.         Macro
  540.         _QTPhotoSetSampling
  541.             move.l              #$000C0100,-(sp)
  542.             moveq               #0,D0
  543.             dc.w                $A82A
  544.         EndM
  545.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  546.         IMPORT_CFM_FUNCTION QTPhotoSetSampling
  547.     ENDIF
  548.  
  549. ;
  550. ; pascal ComponentResult QTPhotoSetRestartInterval(ComponentInstance codec, unsigned short restartInterval)
  551. ;
  552.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  553.         Macro
  554.         _QTPhotoSetRestartInterval
  555.             move.l              #$00020101,-(sp)
  556.             moveq               #0,D0
  557.             dc.w                $A82A
  558.         EndM
  559.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  560.         IMPORT_CFM_FUNCTION QTPhotoSetRestartInterval
  561.     ENDIF
  562.  
  563. ;
  564. ; pascal ComponentResult QTPhotoDefineHuffmanTable(ComponentInstance codec, short componentNumber, Boolean isDC, unsigned char *lengthCounts, unsigned char *values)
  565. ;
  566.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  567.         Macro
  568.         _QTPhotoDefineHuffmanTable
  569.             move.l              #$000C0102,-(sp)
  570.             moveq               #0,D0
  571.             dc.w                $A82A
  572.         EndM
  573.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  574.         IMPORT_CFM_FUNCTION QTPhotoDefineHuffmanTable
  575.     ENDIF
  576.  
  577. ;
  578. ; pascal ComponentResult QTPhotoDefineQuantizationTable(ComponentInstance codec, short componentNumber, unsigned char *table)
  579. ;
  580.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  581.         Macro
  582.         _QTPhotoDefineQuantizationTable
  583.             move.l              #$00060103,-(sp)
  584.             moveq               #0,D0
  585.             dc.w                $A82A
  586.         EndM
  587.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  588.         IMPORT_CFM_FUNCTION QTPhotoDefineQuantizationTable
  589.     ENDIF
  590.  
  591.  
  592. ;  UPP call backs 
  593.  
  594.     ENDIF ; __IMAGECODEC__ 
  595.  
  596.